package com.yanqu.road.server.cmd.thief;

import com.yanqu.road.pb.thief.ThiefProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.thief.ThiefModule;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.GameProtocol;

@Cmd(code = GameProtocol.S_THIEF_GET_REWARD, desc = "领小偷打工奖励")
public class GetThiefWorkRewardCmd extends AbstractCommand {

    String thiefUid;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        ThiefProto.GetThiefWorkRewardReqMsg reqMsg = ThiefProto.GetThiefWorkRewardReqMsg.parseFrom(packet.getBytes());
        thiefUid = reqMsg.getThiefUid();
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        player.getModule(ThiefModule.class).getThiefWorkReward(thiefUid);
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
